<script>
function setupCalendars(){
	Calendar.setup({ dateField: 'popupDateField_{$type}_{$field_name}', triggerElement: 'popupDateField_{$type}_{$field_name}' })
}
setupCalendars();
</script>
<input type="text" name="{$field_name}" class="text" id="popupDateField_{$type}_{$field_name}" class="dateField" value="{$value|date_format:"d-m-Y"}" />